package com.vo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by chihaojie on 2018/11/21.
 */
@Api("订单")
public class OrderCondition {

    @ApiModelProperty("订单id")
    private Long id;

    @ApiModelProperty("页号")
    private Integer pageNo;
    @ApiModelProperty("页面大小")
    private Integer pageSize;

    @ApiModelProperty("订单类型:  1.SALE 售卖仓位  2.RENT,3.RECHARGE充值订单 4.退款订单")
    private Integer orderType;
    @ApiModelProperty("订单编号")
    private String orderNum;
    @ApiModelProperty("医院id")
    private Long hospitalId;

    private String hospitalName;
    @ApiModelProperty("设备id")
    private Long deviceId;
    @ApiModelProperty("设备sn")
    private String deviceSn;
    @ApiModelProperty("仓位类型")
    private Integer boxType;
    @ApiModelProperty("仓位号")
    private String boxNum;
    @ApiModelProperty("代理商id")
    private String agent;
    @ApiModelProperty("渠道: 1.微信  2.支付宝")
    private Integer channel;
    @ApiModelProperty("消费者id")
    private Long customerId;
    @ApiModelProperty("消费者openid")
    private String customerOpendId;


    private String customerNote;
    @ApiModelProperty("商品id")
    private Long productId;
    @ApiModelProperty("商品名称")
    private String productName;

    private BigDecimal singalPrice;

    private Integer buyQuantity;

    private BigDecimal totalPayMoney;

    private String rentWay;

    private Date rentStartTime;

    private Date rentEndTime;

    @ApiModelProperty("支付渠道")
    private Integer payChannel;
    @ApiModelProperty("是否付款: 1:未支付,2:完成支付")
    private Integer isPayed;
    @ApiModelProperty("支付时间")
    private Date payTime;
    @ApiModelProperty("订单流水号")
    private String tradeNum;
    @ApiModelProperty("订单状态：1:正常,2:取消订单,3.超时作废(2分钟内不支付即 当做超时异常单处理)")
    private Byte orderStatus;





    public Integer getPageNo() {
        if(StringUtils.isEmpty(pageNo)){
            pageNo=1;
        }
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        if(StringUtils.isEmpty(pageSize) || pageSize==0){
            pageSize=20;
        }
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public Long getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(Long hospitalId) {
        this.hospitalId = hospitalId;
    }


    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public Integer getBoxType() {
        return boxType;
    }

    public void setBoxType(Integer boxType) {
        this.boxType = boxType;
    }

    public String getBoxNum() {
        return boxNum;
    }

    public void setBoxNum(String boxNum) {
        this.boxNum = boxNum;
    }

    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    public Integer getChannel() {
        return channel;
    }

    public void setChannel(Integer channel) {
        this.channel = channel;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getCustomerOpendId() {
        return customerOpendId;
    }

    public void setCustomerOpendId(String customerOpendId) {
        this.customerOpendId = customerOpendId;
    }

    public String getCustomerNote() {
        return customerNote;
    }

    public void setCustomerNote(String customerNote) {
        this.customerNote = customerNote;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public BigDecimal getSingalPrice() {
        return singalPrice;
    }

    public void setSingalPrice(BigDecimal singalPrice) {
        this.singalPrice = singalPrice;
    }

    public Integer getBuyQuantity() {
        return buyQuantity;
    }

    public void setBuyQuantity(Integer buyQuantity) {
        this.buyQuantity = buyQuantity;
    }

    public BigDecimal getTotalPayMoney() {
        return totalPayMoney;
    }

    public void setTotalPayMoney(BigDecimal totalPayMoney) {
        this.totalPayMoney = totalPayMoney;
    }

    public String getRentWay() {
        return rentWay;
    }

    public void setRentWay(String rentWay) {
        this.rentWay = rentWay;
    }

    public Date getRentStartTime() {
        return rentStartTime;
    }

    public void setRentStartTime(Date rentStartTime) {
        this.rentStartTime = rentStartTime;
    }

    public Date getRentEndTime() {
        return rentEndTime;
    }

    public void setRentEndTime(Date rentEndTime) {
        this.rentEndTime = rentEndTime;
    }

    public Integer getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(Integer payChannel) {
        this.payChannel = payChannel;
    }

    public Integer getIsPayed() {
        return isPayed;
    }

    public void setIsPayed(Integer isPayed) {
        this.isPayed = isPayed;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getTradeNum() {
        return tradeNum;
    }

    public void setTradeNum(String tradeNum) {
        this.tradeNum = tradeNum;
    }

    public Byte getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Byte orderStatus) {
        this.orderStatus = orderStatus;
    }
}
